﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="order_list.aspx.cs" Inherits="SF.Ucenter.admin.goods.orders.order_list" %>
<%@ Import Namespace="SF.Common" %>

<!DOCTYPE html>

<%--订单查询表--%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>商品订单表</title>
    <link href="../../../scripts/artdialog/ui-dialog.css" rel="stylesheet" type="text/css" />
    <link href="../../skin/default/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/pagination.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" charset="utf-8" src="../../../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../../scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../../scripts/datepicker/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../js/laymain.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../js/common.js"></script>

    <style type="text/css">
        .toolbar .l-list .icon-list {
            margin-top: 7px;
        }

        .keywordtip {
            display: block;
            float: left;
            margin: 0;
            padding: 0 5px;
            height: 30px;
            line-height: 28px;
            font-size: 12px;
            color: #444;
        }
    </style>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
            <a href="../../First.aspx" class="home"><i></i><span>首页</span></a>
            <i class="arrow"></i>
            <span>订单查询</span>
        </div>
        <!--/导航栏-->

        <!--工具栏-->
        <div id="floatHead" class="toolbar-wrap">
            <div class="toolbar">
                <div class="box-wrap">
                    <div class="l-list">
                        <ul class="icon-list">
                            <li><span>金额：<asp:Label ID="lblTotalMoney" runat="server" /></span></li>
                        </ul>
                        <ul class="icon-list" style="margin-top:0px;">
                            <li>
                                <%--<asp:LinkButton ID="LinkButton1" runat="server" style="border-left:solid 1px #dbdbdb;cursor:pointer;" CssClass="down" OnClick="btndownExcel_Click"><i></i><span>下载Excel</span></asp:LinkButton>--%>
                            </li>
                            <li>
                                <a style="<%=dis%>" class="lock" href="order_withdrawal.aspx"><i></i><span>提现订单</span></a>
                            </li>
                        </ul>
                        <div class="menu-list">
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlStatus" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                                    <asp:ListItem Value="0">全部</asp:ListItem>
                                    <asp:ListItem Value="1">待支付</asp:ListItem>
                                    <asp:ListItem Value="2">支付完成</asp:ListItem>
                                </asp:DropDownList>

                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlDone" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDone_SelectedIndexChanged">
                                    <asp:ListItem Value="0">全部</asp:ListItem>
                                    <asp:ListItem Value="1">已结算</asp:ListItem>
                                    <asp:ListItem Value="2">未结算</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlPayWay" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPayWay_SelectedIndexChanged">
                                    <asp:ListItem Value="0">全部</asp:ListItem>
                                    <asp:ListItem Value="1">在线支付</asp:ListItem>
                                    <asp:ListItem Value="2">货到付款</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="rule-single-select">
                                <asp:DropDownList ID="ddlExpress" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlExpress_SelectedIndexChanged">
                                    <asp:ListItem Value="0">全部</asp:ListItem>
                                    <asp:ListItem Value="1">未打单</asp:ListItem>
                                    <asp:ListItem Value="2">已打单</asp:ListItem>
                                    <asp:ListItem Value="3">多次打单</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                    <div class="r-list">
                        <span class="keywordtip">筛选</span>
                        <asp:TextBox ID="txtKeyWords" runat="server" style="width:50px;"  CssClass="keyword" />
                        <span class="keywordtip">时间</span>
                        <asp:TextBox ID="txtStartTime" runat="server" CssClass="keyword" ReadOnly="true"
                            onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
                        <span class="keywordtip">- </span>
                        <asp:TextBox ID="txtEndTime" runat="server" CssClass="keyword" ReadOnly="true"
                            onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />

                        <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="btn-search" OnClick="btnSearch_Click">查询</asp:LinkButton>
                    </div>
                </div>
            </div>
        </div>
        <!--/工具栏-->

        <!--列表-->
        <asp:Repeater ID="rptList" runat="server">
            <HeaderTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
                    <tr>
                        <th width="1%"></th>
                        <th align="left" width="14%">订单编号</th>
                        <th align="left" width="15%">用户编号</th>
                        <th align="left" width="7%">支付方式</th>
                        <th align="left" width="14%">地址信息</th>
                        <th align="center" width="8%">小计</th>
                        <th align="left" width="10%">订单时间</th>
                        <th align="left" width="10%">支付时间</th>
                        <th width="6%">支付信息</th>
                        <th width="6%">物流信息</th>
                        <th width="6%">是否结算</th>
                        <th align="left" width="5%">操作</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td></td>
                    <td><%# Eval("orderNum") %></td>
                    <td><%# Eval("userNum") %></td>
                    <td><%# Eval("payWay").ToString().Equals("1")?"微支付":"货到付款" %></td>
                    <td title="<%# Eval("addressText").ToString()%>"><%# Eval("addressText").ToString().Length>=19?Eval("addressText").ToString().Substring(0,16)+"...":Eval("addressText").ToString() %></td>
                    <td align="center"><%# Eval("totalMoney") %></td>
                    <td><%#string.Format("{0:g}",Eval("addTime"))%></td>
                    <td><%#string.IsNullOrEmpty(string.Format("{0:g}",Eval("payTime")))?"":string.Format("{0:g}",Eval("payTime"))%></td>
                    <td class="ispay" align="center" ><%# Eval("isPay").ToString().Equals("1")?"待支付":"支付完成" %></td>
                    <td class="express" align="center" ><%# Eval("isExpress").ToString().Equals("1")?"未打单":Eval("isExpress").ToString().Equals("2")?"已打单":"多次打单" %></td>
                    <td class="isdone" align="center"><%# Eval("isComDone").ToString().Equals("1")?"已结算":"未结算" %></td>
                    <td><a href="order_msg.aspx?action=<%#DTEnums.ActionEnum.View %>&id=<%#Eval("id")%>">明细</a></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"10\">暂无订单记录</td></tr>" : ""%>
</table>
            </FooterTemplate>
        </asp:Repeater>
        <!--/列表-->


        <!--内容底部-->
        <div class="line20"></div>
        <div class="pagelist">
            <div class="l-btns">
                <span>显示</span><asp:TextBox ID="txtPageNum" runat="server" CssClass="pagenum" onkeydown="return checkNumber(event);" OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span>条/页</span>
            </div>
            <div id="PageContent" runat="server" class="default"></div>
        </div>
        <!--/内容底部-->
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".ispay").each(function (index, ispay) {
                if ($(this).text() == "待支付") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
            $(".isdone").each(function (index, isdone) {
                if ($(this).text() == "未结算") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
            $(".express").each(function (index, express) {
                if ($(this).text() == "未打单") {
                    $(this).css("color", "red");
                } else {
                    $(this).css("color", "green");
                }
            });
        });
    </script>
</body>
</html>

